Skip to content

Document DataGrid2 column name derivation rules and TextTemplate read path#299

Open
yscraft wants to merge 1 commit intomendixlabs:mainfrom
yscraft:docs/issue-116-skill-updates
Open

Document DataGrid2 column name derivation rules and TextTemplate read path#299
yscraft wants to merge 1 commit intomendixlabs:mainfrom
yscraft:docs/issue-116-skill-updates

Conversation

@yscraft
Copy link
Copy Markdown

@yscraft yscraft commented Apr 24, 2026

Summary

Follow-up to #298. Documents two lessons surfaced by issue #116 so future contributors don't repeat the same mistakes.

  • alter-page.md — adds a troubleshooting section under DataGrid Column Operations explaining the silent no-op symptom when column names don't match ALTER PAGE expectations, and documents all three derivation rules (attribute short name → Description; sanitized caption → Order_Status; all-special-char caption → col{N})
  • debug-bson.md — adds a "Reading TextTemplate in executor code" subsection to Part 10 documenting the correct TextTemplate → Template → Items traversal path, with wrong/correct Go examples. The missing Template level was the root cause of DESCRIBE PAGE widget names don't match ALTER PAGE identifiers #116.

Test plan

🤖 Generated with Claude Code

… path

add troubleshooting section to alter-page.md covering the silent no-op
symptom when column names don't match, and document all three derivation
rules (attribute short name, sanitized caption, col{N} fallback).

add reading TextTemplate section to debug-bson.md Part 10 documenting
the correct TextTemplate → Template → Items traversal path for executor
code, with wrong/correct Go examples. surfaced by issue mendixlabs#116.
@yscraft
Copy link
Copy Markdown
Author

yscraft commented Apr 24, 2026

Hey @ako, this is a docs follow-up to #298 — captures the DataGrid2 column name derivation rules and the correct TextTemplate read path as lessons in the skills files.

@github-actions
Copy link
Copy Markdown

AI Code Review

Review Summary

This is a documentation-only PR that adds troubleshooting guidance for two specific issues discovered during development. The changes are focused and accurate.

What Looks Good

  • alter-page.md: Adds a clear troubleshooting section for ALTER PAGE column operations that silently fail due to name derivation mismatches. The three derivation rules (attribute short name, sanitized caption, special-char fallback) are correctly documented with examples. This addresses a real pain point users would encounter.
  • debug-bson.md: Provides precise guidance on the TextTemplate → Template → Items traversal path that was the root cause of DESCRIBE PAGE widget names don't match ALTER PAGE identifiers #116. The wrong/correct Go examples are extremely helpful for preventing similar mistakes. The explanation is technically accurate and actionable.
  • Both additions fit naturally within their respective skill files and follow the existing documentation style.
  • As a docs-only change, it correctly avoids touching code or introducing implementation risks.

Recommendation

Approve. The documentation provides valuable, precise guidance that will prevent future contributors from repeating the same mistakes. It meets all relevant checklist items for documentation changes (no overlap, correct placement, accurate content). No changes needed.


Automated review via OpenRouter (Nemotron Super 120B) — workflow source

Copy link
Copy Markdown
Collaborator

@ako ako left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review — PR #299

Overview: Docs-only follow-up to #298. Two additions to skill files documenting lessons from issue #116. Short, accurate, and useful.


alter-page.md addition

Good troubleshooting section. The three derivation rules are correct and match the fixed code in #298:

  • Attribute-bound → short attribute name ✓
  • Caption-only → sanitized caption ✓
  • All-special-char caption → col{N}

The final tip ("attribute names take priority over captions") is accurate and pre-empts a likely follow-up confusion.

One small wording note: "completes without error but makes no change" implies this is always silent. Worth clarifying why — the column traversal in dSet is intentionally silent for absent keys (documented in page_mutator.go). So this is by design, not a missing error. Optional — the current wording is still accurate.


debug-bson.md addition

The WRONG/CORRECT Go snippet directly shows the mistake and the fix. dGet(template, "Items") on a nil template is safe (iterating a nil bson.D returns nil → empty slice → loop doesn't run), so the example works correctly even without an explicit nil guard.

Breadth note: "This applies to any executor function that reads column headers, button captions, or any other translatable text stored as Forms$ClientTemplate" — good, this generalises the lesson beyond DataGrid2.


Dependency

Must merge after #298 (and after #298's requested changes are addressed — specifically the template = tmpl fallback). If the fallback is dropped from #298, the docs here remain accurate: the CORRECT example already doesn't rely on it.


Overall: Approve — clean, accurate, and useful. Merge after #298.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants